Optimal. Leaf size=213 \[ \frac{\sqrt{d (c d-b e)-b e^2 x-c e^2 x^2} (-3 b e g+4 c d g+2 c e f)}{c^2 e^2 (2 c d-b e)}-\frac{(-3 b e g+4 c d g+2 c e f) \tan ^{-1}\left (\frac{e (b+2 c x)}{2 \sqrt{c} \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{2 c^{5/2} e^2}+\frac{2 (d+e x)^2 (-b e g+c d g+c e f)}{c e^2 (2 c d-b e) \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.284045, antiderivative size = 213, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 44, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {788, 640, 621, 204} \[ \frac{\sqrt{d (c d-b e)-b e^2 x-c e^2 x^2} (-3 b e g+4 c d g+2 c e f)}{c^2 e^2 (2 c d-b e)}-\frac{(-3 b e g+4 c d g+2 c e f) \tan ^{-1}\left (\frac{e (b+2 c x)}{2 \sqrt{c} \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{2 c^{5/2} e^2}+\frac{2 (d+e x)^2 (-b e g+c d g+c e f)}{c e^2 (2 c d-b e) \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 788
Rule 640
Rule 621
Rule 204
Rubi steps
\begin{align*} \int \frac{(d+e x)^2 (f+g x)}{\left (c d^2-b d e-b e^2 x-c e^2 x^2\right )^{3/2}} \, dx &=\frac{2 (c e f+c d g-b e g) (d+e x)^2}{c e^2 (2 c d-b e) \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}-\frac{(2 c e f+4 c d g-3 b e g) \int \frac{d+e x}{\sqrt{c d^2-b d e-b e^2 x-c e^2 x^2}} \, dx}{c e (2 c d-b e)}\\ &=\frac{2 (c e f+c d g-b e g) (d+e x)^2}{c e^2 (2 c d-b e) \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}+\frac{(2 c e f+4 c d g-3 b e g) \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}{c^2 e^2 (2 c d-b e)}-\frac{(2 c e f+4 c d g-3 b e g) \int \frac{1}{\sqrt{c d^2-b d e-b e^2 x-c e^2 x^2}} \, dx}{2 c^2 e}\\ &=\frac{2 (c e f+c d g-b e g) (d+e x)^2}{c e^2 (2 c d-b e) \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}+\frac{(2 c e f+4 c d g-3 b e g) \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}{c^2 e^2 (2 c d-b e)}-\frac{(2 c e f+4 c d g-3 b e g) \operatorname{Subst}\left (\int \frac{1}{-4 c e^2-x^2} \, dx,x,\frac{-b e^2-2 c e^2 x}{\sqrt{c d^2-b d e-b e^2 x-c e^2 x^2}}\right )}{c^2 e}\\ &=\frac{2 (c e f+c d g-b e g) (d+e x)^2}{c e^2 (2 c d-b e) \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}+\frac{(2 c e f+4 c d g-3 b e g) \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}{c^2 e^2 (2 c d-b e)}-\frac{(2 c e f+4 c d g-3 b e g) \tan ^{-1}\left (\frac{e (b+2 c x)}{2 \sqrt{c} \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{2 c^{5/2} e^2}\\ \end{align*}
Mathematica [A] time = 0.627517, size = 201, normalized size = 0.94 \[ \frac{\sqrt{c} \sqrt{e} (d+e x) \sqrt{e (2 c d-b e)} (c (3 d g+2 e f-e g x)-3 b e g)+e \sqrt{d+e x} (b e-2 c d) \sqrt{\frac{b e-c d+c e x}{b e-2 c d}} (-3 b e g+4 c d g+2 c e f) \sin ^{-1}\left (\frac{\sqrt{c} \sqrt{e} \sqrt{d+e x}}{\sqrt{e (2 c d-b e)}}\right )}{c^{5/2} e^{5/2} \sqrt{e (2 c d-b e)} \sqrt{(d+e x) (c (d-e x)-b e)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.01, size = 1320, normalized size = 6.2 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 5.33575, size = 1057, normalized size = 4.96 \begin{align*} \left [-\frac{{\left (2 \,{\left (c^{2} d e - b c e^{2}\right )} f +{\left (4 \, c^{2} d^{2} - 7 \, b c d e + 3 \, b^{2} e^{2}\right )} g -{\left (2 \, c^{2} e^{2} f +{\left (4 \, c^{2} d e - 3 \, b c e^{2}\right )} g\right )} x\right )} \sqrt{-c} \log \left (8 \, c^{2} e^{2} x^{2} + 8 \, b c e^{2} x - 4 \, c^{2} d^{2} + 4 \, b c d e + b^{2} e^{2} - 4 \, \sqrt{-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}{\left (2 \, c e x + b e\right )} \sqrt{-c}\right ) - 4 \,{\left (c^{2} e g x - 2 \, c^{2} e f - 3 \,{\left (c^{2} d - b c e\right )} g\right )} \sqrt{-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}}{4 \,{\left (c^{4} e^{3} x - c^{4} d e^{2} + b c^{3} e^{3}\right )}}, -\frac{{\left (2 \,{\left (c^{2} d e - b c e^{2}\right )} f +{\left (4 \, c^{2} d^{2} - 7 \, b c d e + 3 \, b^{2} e^{2}\right )} g -{\left (2 \, c^{2} e^{2} f +{\left (4 \, c^{2} d e - 3 \, b c e^{2}\right )} g\right )} x\right )} \sqrt{c} \arctan \left (\frac{\sqrt{-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}{\left (2 \, c e x + b e\right )} \sqrt{c}}{2 \,{\left (c^{2} e^{2} x^{2} + b c e^{2} x - c^{2} d^{2} + b c d e\right )}}\right ) - 2 \,{\left (c^{2} e g x - 2 \, c^{2} e f - 3 \,{\left (c^{2} d - b c e\right )} g\right )} \sqrt{-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}}{2 \,{\left (c^{4} e^{3} x - c^{4} d e^{2} + b c^{3} e^{3}\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (d + e x\right )^{2} \left (f + g x\right )}{\left (- \left (d + e x\right ) \left (b e - c d + c e x\right )\right )^{\frac{3}{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.31007, size = 576, normalized size = 2.7 \begin{align*} \frac{\sqrt{-c x^{2} e^{2} + c d^{2} - b x e^{2} - b d e}{\left ({\left (\frac{{\left (4 \, c^{3} d^{2} g e^{3} - 4 \, b c^{2} d g e^{4} + b^{2} c g e^{5}\right )} x}{4 \, c^{4} d^{2} e^{3} - 4 \, b c^{3} d e^{4} + b^{2} c^{2} e^{5}} - \frac{8 \, c^{3} d^{3} g e^{2} + 8 \, c^{3} d^{2} f e^{3} - 20 \, b c^{2} d^{2} g e^{3} - 8 \, b c^{2} d f e^{4} + 14 \, b^{2} c d g e^{4} + 2 \, b^{2} c f e^{5} - 3 \, b^{3} g e^{5}}{4 \, c^{4} d^{2} e^{3} - 4 \, b c^{3} d e^{4} + b^{2} c^{2} e^{5}}\right )} x - \frac{12 \, c^{3} d^{4} g e + 8 \, c^{3} d^{3} f e^{2} - 24 \, b c^{2} d^{3} g e^{2} - 8 \, b c^{2} d^{2} f e^{3} + 15 \, b^{2} c d^{2} g e^{3} + 2 \, b^{2} c d f e^{4} - 3 \, b^{3} d g e^{4}}{4 \, c^{4} d^{2} e^{3} - 4 \, b c^{3} d e^{4} + b^{2} c^{2} e^{5}}\right )}}{c x^{2} e^{2} - c d^{2} + b x e^{2} + b d e} - \frac{{\left (4 \, c d g + 2 \, c f e - 3 \, b g e\right )} \sqrt{-c e^{2}} e^{\left (-3\right )} \log \left ({\left | -2 \,{\left (\sqrt{-c e^{2}} x - \sqrt{-c x^{2} e^{2} + c d^{2} - b x e^{2} - b d e}\right )} c - \sqrt{-c e^{2}} b \right |}\right )}{2 \, c^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]